package com.sina.medical.service.user;


import com.sina.medical.core.dao.BaseService;
import com.sina.medical.core.exception.SinaCustomException;
import com.sina.medical.domain.user.User;
/**
 * Created by Backache on 2017/7/2.
 * 用户接口
 */
public interface UserService extends BaseService {


    boolean isExist(Integer uid);

    User saveUser(User user);

    /**
     * 检查用户是否存在，不存在则抛出异常
     * @param uid 可以为null
     */
    void checkExist(Integer uid) throws SinaCustomException;



    User getUserById(Integer userId);

    /**
     * 获取User，如果不存在则抛出异常
     */
    User getUserByIdCheckExist(Integer userId);

}
